﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace Rappelz.GameServer
{
    public class SkillResult
    {
        public enum ResultType : int
        {
            Damage = 0,
            MagicDamage = 1,
            DamageWithKnockBack = 2,
            Result = 10,
            AddHP = 20,
            AddMP = 21,
            AddHPMPSP = 22,
            Rebirth = 23,
            Rush = 30,
            NotUse = 100,
        }
// UserDefinedType: SkillResult
// Enum           :   <unnamed-tag>, Type: int
// Data           :     constant 0xA, Constant, Type: int, ADD_STATE
// Data           :     constant 0xB, Constant, Type: int, REMOVE_STATE
// Data           :     constant 0xC, Constant, Type: int, ADD_HATE
// Data           :     constant 0x15, Constant, Type: int, TURN_ON
// Data           :     constant 0x16, Constant, Type: int, TURN_OFF
// Data           :     constant 0x1E, Constant, Type: int, SUMMON_DEAD
// Data           :     constant 0x1F, Constant, Type: int, TARGET_DEAD
// Data           :     constant 0x28, Constant, Type: int, CREATE_ITEM
// Data           :     constant 0x29, Constant, Type: int, RESPAWN_MONSTER
// Enum           :   <unnamed-tag>, Type: int
// Data           :     constant 0x1, Constant, Type: int, CRITICAL
// Data           :     constant 0x2, Constant, Type: int, MISS
// Data           :     constant 0x4, Constant, Type: int, BLOCK
// Data           :     constant 0x8, Constant, Type: int, PERFECT_BLOCK
// Function       :   public int GetType()
// Function       :   public unsigned int GetTargetHandle()
// Function       :   public int GetDamage()
        public class Damage
        {
            public byte type;
            public uint hTarget;
            public int target_hp;               // Data           :     this+0x5, Member, Type: int, target_hp
            public byte damage_type;            // Data           :     this+0x9, Member, Type: char, damage_type
            public int damage;                  // Data           :     this+0xA, Member, Type: int, damage
            public int flag;                    // Data           :     this+0xE, Member, Type: int, flag
            public ushort[] elemental_damage = new ushort[7]; // Data           :     this+0x12, Member, Type: unsigned short[0x7], elemental_damage
        }
// Data           :     this+0x0, Member, Type: unsigned char, type
// Data           :     this+0x1, Member, Type: unsigned int, hTarget
// Data           :     this+0x5, Member, Type: int, target_hp
// Data           :     this+0x9, Member, Type: char, damage_type
// Data           :     this+0xA, Member, Type: int, damage
// Data           :     this+0xE, Member, Type: int, flag
// Data           :     this+0x12, Member, Type: unsigned short[0x7], elemental_damage
// UserDefinedType:   DamageWithKnockBackType
// Data           :     this+0x0, Member, Type: unsigned char, type
// Data           :     this+0x1, Member, Type: unsigned int, hTarget
// Data           :     this+0x5, Member, Type: int, target_hp
// Data           :     this+0x9, Member, Type: char, damage_type
// Data           :     this+0xA, Member, Type: int, damage
// Data           :     this+0xE, Member, Type: int, flag
// Data           :     this+0x12, Member, Type: unsigned short[0x7], elemental_damage
// Data           :     this+0x20, Member, Type: float, x
// Data           :     this+0x24, Member, Type: float, y
// Data           :     this+0x28, Member, Type: unsigned char, speed
// Data           :     this+0x29, Member, Type: unsigned long, knock_back_time

        public class Result
        {
            public bool bResult;        // Data           :     this+0x5, Member, Type: bool, bResult
            public int success_type;    // Data           :     this+0x6, Member, Type: int, 

        }
// Data           :     this+0x0, Member, Type: unsigned char, type
// Data           :     this+0x1, Member, Type: unsigned int, hTarget
        public class AddHPType
        {
            public byte type;               // 0x0
            public uint hTarget;            // 0x1
            public int target_hp;           // 0x5
            public int nIncHP;              // 0x9
        }

// UserDefinedType:   AddHPMPSPType
// Data           :     this+0x0, Member, Type: unsigned char, type
// Data           :     this+0x1, Member, Type: unsigned int, hTarget
// Data           :     this+0x5, Member, Type: int, target_hp
// Data           :     this+0x9, Member, Type: int, nIncHP
// Data           :     this+0xD, Member, Type: int, nIncMP
// Data           :     this+0x11, Member, Type: int, nIncSP
// Data           :     this+0x15, Member, Type: short, target_mp
// UserDefinedType:   RushType
// Data           :     this+0x0, Member, Type: unsigned char, type
// Data           :     this+0x1, Member, Type: unsigned int, hTarget
// Data           :     this+0x5, Member, Type: bool, bResult
// Data           :     this+0x6, Member, Type: float, x
// Data           :     this+0xA, Member, Type: float, y
// Data           :     this+0xE, Member, Type: float, face
// Data           :     this+0x12, Member, Type: unsigned char, speed
// UserDefinedType:   RebirthType
// Data           :     this+0x0, Member, Type: unsigned char, type
// Data           :     this+0x1, Member, Type: unsigned int, hTarget
// Data           :     this+0x5, Member, Type: int, target_hp
// Data           :     this+0x9, Member, Type: int, nIncHP
// Data           :     this+0xD, Member, Type: int, nIncMP
// Data           :     this+0x11, Member, Type: int, nRecoveryEXP
// Data           :     this+0x15, Member, Type: short, target_mp
// Data           :   this+0x0, Member, Type: struct SkillResult::DamageType, damage
// UserDefinedType:     SkillResult::DamageType
// 
// Data           :   this+0x0, Member, Type: struct SkillResult::DamageWithKnockBackType, damage_kb
// UserDefinedType:     SkillResult::DamageWithKnockBackType
// 
// Data           :   this+0x0, Member, Type: struct SkillResult::ResultType, result
// UserDefinedType:     SkillResult::ResultType
// 
// Data           :   this+0x0, Member, Type: struct SkillResult::AddHPType, add_hp
// UserDefinedType:     SkillResult::AddHPType
// 
// Data           :   this+0x0, Member, Type: struct SkillResult::AddHPMPSPType, add_hp_mp_sp
// UserDefinedType:     SkillResult::AddHPMPSPType
// 
// Data           :   this+0x0, Member, Type: struct SkillResult::RushType, rush
// UserDefinedType:     SkillResult::RushType
// 
// Data           :   this+0x0, Member, Type: struct SkillResult::RebirthType, rebirth
// UserDefinedType:     SkillResult::RebirthType
// 
// Function       :   public void SkillResult()
        // these 2 are always the same
        public byte type;
        public uint hTarget;

        // Damage
        public int target_hp;               // Data           :     this+0x5, Member, Type: int, target_hp
        public byte damage_type;            // Data           :     this+0x9, Member, Type: char, damage_type

        public Result result;
        public Damage damage;
        public AddHPType addHPType;

    }
}
